﻿<UserControl x:Class="WpfImageDuplicates.FilterCollectionCollectionView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:vm="clr-namespace:ImageAppViewModels"
    xmlns:y="clr-namespace:WpfImageDuplicates">
    <UserControl.CommandBindings>
        <CommandBinding Command="{x:Static y:GeneralCommands.FilterCollectionAddCommand}" Executed="Add"/>
        <CommandBinding Command="{x:Static y:GeneralCommands.FilterCollectionMakeCopyCommand}" Executed="MakeCopy"/>        
        <CommandBinding Command="{x:Static y:GeneralCommands.FilterCollectionRemoveCommand}" Executed="Remove"/>
        <CommandBinding Command="{x:Static y:GeneralCommands.FilterCollectionRenameCommand}" Executed="Rename"/>
    </UserControl.CommandBindings>
    <Grid x:Name="grid" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        <StackPanel x:Name="stacker1" Orientation="Horizontal" HorizontalAlignment="Left">
            <TextBlock FontSize="10" Text=" Select Filter Collection: " FontWeight="Bold" VerticalAlignment="Center" />
            <ComboBox FontSize="10" VerticalAlignment="Center" x:Name="cboUserDefined" MinWidth="140"  ItemsSource="{Binding Mode=OneWay, Path=FilterCollectionNames}" SelectionChanged="cboUserDefined_SelectionChanged"/>            
        </StackPanel>
        <StackPanel x:Name="stacker2" Orientation="Horizontal" HorizontalAlignment="Right">
            <TextBlock FontSize="10" VerticalAlignment="Center" Text="Add New Filter Collection: " FontWeight="Bold" />
            <TextBox FontSize="10" VerticalAlignment="Center"  x:Name="txtAddFilterCollection" MinWidth="120" AcceptsReturn="False"/>
            <Button FontSize="10" VerticalAlignment="Center" x:Name="btnSave" Content="Save" 
                    Click="btnSave_Click" />
            <Button FontSize="10" VerticalAlignment="Center" x:Name="btnLoad" Content="Load" 
                    Click="btnLoad_Click" />
            <Button FontSize="10" VerticalAlignment="Center" x:Name="btnRename" Content="Rename" 
                    Command="{x:Static y:GeneralCommands.FilterCollectionRenameCommand}" 
                    />
            <Button FontSize="10" VerticalAlignment="Center" x:Name="btnAdd" Content="Add" 
                    Command="{x:Static y:GeneralCommands.FilterCollectionAddCommand}" 
                    />
            <Button FontSize="10" VerticalAlignment="Center" x:Name="btnMakeCopy" Content="Make Copy" 
                    Command="{x:Static y:GeneralCommands.FilterCollectionMakeCopyCommand}" 
                    />
            <Button FontSize="10" VerticalAlignment="Center" x:Name="btnRemove" Content="Remove Selected" 
                    Command="{x:Static y:GeneralCommands.FilterCollectionRemoveCommand}" />
        </StackPanel>
    </Grid>
</UserControl>
